<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>HELLO Index</h1>

    <script src="./axios.min.js"></script>
    <script>
      const request = axios.create({
        baseURL: "http://127.0.0.1:8090/api/collections",
      });
      request
        .get("/users/records", {
          transformRequest: [
            (body, headers) => {
              headers.username = "jack";
              headers.age = 20;
              return body;
            },
          ],
          transformResponse: [
            (body) => {
              return JSON.parse(body);
            },
          ],
        })
        .then((res) => {
          console.log(res);
        });
    </script>
  </body>
</html>
